home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Night Owl 6
/
Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso
/
008a
/
duocalc.zip
/
DUOCALC.DOC
next >
Wrap
Text File
|
1991-11-05
|
6KB
|
131 lines
DUOCALC
DUOCALC is a combination RPN calculator and financial calculator written in
Turbo Pascal 5.0.
The following primitives are supported:
+ plus
- minus
* times
/ divide
^ power
\ inverse
% percent
ln natural log
log log10
pi PI
e e
abs absolute value
int integer part
frac fractional part
mod modulus
chs change sign
sqrt square root
sqr square
sin sine
cos cosine
tan tangent
asin arcsine
acos arccosine
atan arctangent
hr convert HH.MMSSHH to decimal hours
hms convert decimal hrs to HH.MMSSHH
jdn convert YYYY.MMDD to julian day number
date convert julian day number to YYYY.MMDD
drop [n1 n2 ... n1]
dup [n1 ... n1 n1]
swap [n1 n2 ... n2 n1]
over [n1 n2 ... n1 n2 n1]
rot [n1 n2 n3 ... n2 n3 n1]
clst clear stack
clrg clear registers
! store to a register
+! add top of stack to a register
@ fetch from a register
fix set format for fixed display (e.g. 10.2 fix)
sci set format for scientific display
F! store to a financial register
F@ fetch from a financial register
[ ... ] summation i.e. [ 1 2 3 4 5 6 ] = Σ 1..6
The stack size is 10 and there are 10 registers (0-9). Up to 80
characters may be entered on a command line with full editing capabilities.
Hex and binary support:
The calculator has limited support for hex and binary integer conversions.
For binary or hex integer input use a 'b' or 'h' suffix, e.g. 1011b or
0AFh. Note that hex integers with a first digit > 9 must start with 0. To
display the top stack register as a hex or binary integer you may use the HEX
or BIN command at the prompt. Binary and hex integers must be between
0 and 2^32-1.
Date support:
Date arithmetic is supported using the jdn and date operators. With a julian
day number on the stack, entering the command DOW will display the
corresponding day of the week, noting that the day-of-the-week is
jdn 1 + 7 mod.
Clearing the calculator window:
The calculator window may be cleared by entering the command CLS at the prompt.
Returning to DOS:
Quit by pressing escape at the prompt.
Financial functions:
The financial functions are invoked by pressing F3, then executing the
particular financial function needed. The standard convention that a negative
sign indicates a cash outflow is used. The compounding frequency (CF)
is the number of times the interest is compounded during the period implied
by the given interest rate, while the payment frequency (PF) is the number
of payments to be made during the same period. When no payments are involved,
PF = CF. For continuous compounding CF=PF=1. A monthly interest problem could
be stated using the annual interest rate divided by 12 or using the annual
interest rate and setting CF=PF=12. Note that the number of payments remains
the same, the number of months. The flags [D,E] and [B,E] indicate whether
calculations are based on discrete or contiouous compounding and beginning
or end of period payments. The default is DE, discrete compounding and end
of period payments.
The financial calculator stores the five arguments in financial registers 1-5.
Use the F! and F@ operators to move arguments between the stack and the
financial registers. If you are using the financial calculator and want to do
a calculation on the stack to determine a particular argument, move to the
appropriate register and press F3. This will return you to the RPN calculator
with the financial register number on the stack. Do your calculation,
then swap followed by F!, then press F3 to return to where you were. To get
back to the RPN calculator you may also press escape while the cursor is on any of
the function buttons. Pressing escape while in one of the registers will
only put undo any changes being made. Navigation around the financial calculator
is done using the arrow keys, tab and shift-tab.
Help and stack/register display:
To get help (a list of the functions provided by DUOCALC) press F1 at the
prompt. Pressing F2 at the prompt will display the stack and register.
Pressing any key will close the help or stack/register window.
Caveats:
I have tried to trap potential error conditions, and if one is found
or if an unknown command is found in the command string, the string will
be written out with an underscore after the error. It is possible, however,
that errors such as numeric overflow will occur, so be warned. To the best
of my knowledge all numerical algorithms are correct and work as described,
however no representation is made that such is actually the case. The
calculator will make use of a math coprocessor if one is present.
Jason Olasky
874 New Mark Esplanade
Rockville, MD 20850
Nov. 5, 1991
Registration: $5.00
Registration + Source Code: $10.00